import { defineComponent, ref, onMounted, resolveComponent, openBlock, createBlock, mergeProps } from "vue";
const _sfc_main = /* @__PURE__ */ defineComponent({
  name: "index",
  props: {
    percentage: { default: 0 },
    isAnimate: { type: Boolean, default: false },
    time: { default: 0 }
  },
  setup(__props) {
    const props = __props;
    const p = ref(0);
    onMounted(() => {
      if (props.isAnimate) {
        const onceTime = Math.ceil(props.time / props.percentage);
        const timer = setInterval(() => {
          ++p.value;
          if (p.value >= props.percentage) {
            p.value = props.percentage;
            clearInterval(timer);
          }
        }, onceTime);
      }
    });
    return (_ctx, _cache) => {
      const _component_el_progress = resolveComponent("el-progress");
      return openBlock(), createBlock(_component_el_progress, mergeProps({ percentage: p.value }, _ctx.$attrs), null, 16, ["percentage"]);
    };
  }
});
var index = {
  install(app) {
    app.component("MnProgress", _sfc_main);
  }
};
export { index as default };
